package com.fastloan.mgt.expert.service.impl;

import com.fastloan.common.BasicServiceImpl;
import com.fastloan.mgt.expert.dao.ExpertMapper;
import com.fastloan.mgt.expert.dao.ExpertProductMapper;
import com.fastloan.mgt.expert.model.ExpertProduct;
import com.fastloan.mgt.expert.model.vo.ExpertVO;
import com.fastloan.mgt.expert.service.ExpertService;
import com.fastloan.mgt.expert.model.Expert;
import com.fastloan.safe.core.util.ManagerKit;
import com.kawins.supers.table.manager.DataTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author admins createTime 2017/11/10
 */
@Service
public class ExpertServiceImpl extends BasicServiceImpl<Expert> implements ExpertService {

    @Autowired
    private ExpertMapper expertMapper;

    @Override
    public List<ExpertVO> queryAllExpert(String orgId) {
        Map<String, Object> map = new HashMap<>(1);
        map.put("orgId", orgId);
        return expertMapper.queryAllExpert(map);
    }

    @Override
    @DataTable(name = "queryExpertAll")
    public List<ExpertVO> pageList(Map<String, Object> map) {
        map.put("orgId", ManagerKit.getTopOrgId());
        return expertMapper.queryAllExpert(map);
    }


}
